/*
 * Copyright 1993-2009 NVIDIA Corporation.  All rights reserved.
 *
 * NVIDIA Corporation and its licensors retain all intellectual property and 
 * proprietary rights in and to this software and related documentation. 
 * Any use, reproduction, disclosure, or distribution of this software 
 * and related documentation without an express license agreement from
 * NVIDIA Corporation is strictly prohibited.
 *
 * Please refer to the applicable NVIDIA end user license agreement (EULA) 
 * associated with this source code for terms and conditions that govern 
 * your use of this NVIDIA software.
 * 
 */

/***********************************************************************/
/*************** TCDM VARIABLE TO BE CHECKED ***************************/
/***********************************************************************/
/* RESULT: h_C                                                         */
/* LENGTH: 256                                                         */
/***********************************************************************/
/****************** EXPECTED RESULT ************************************/
/***********************************************************************/
/* EXPECTED: RESULT_MUL                                                */ 
/***********************************************************************/



#ifndef _MATRIXMUL_H_
#define _MATRIXMUL_H_

// Thread block size
#define BLOCK_SIZE 16

// Matrix dimensions
// (chosen as multiples of the thread block size for simplicity)
#define WA (BLOCK_SIZE) // Matrix A width
#define HA (BLOCK_SIZE) // Matrix A height
#define WB (BLOCK_SIZE) // Matrix B width
#define HB WA  // Matrix B height
#define WC WB  // Matrix C width
#define HC HA  // Matrix C height

#endif // _MATRIXMUL_H_


// BLOCK_SIZE = 8
  /* const int RESULT_MUL[8*8] = {1120, 1148, 1176, 1204, 1232, 1260, 1288, 1316, 2912, 3004, 3096, 3188, 3280, 3372, 3464, 3556, 4704, 4860, 5016, 5172, 5328, 5484, 5640, 5796, 6496, 6716, 6936, 7156, 7376, 7596, 7816, 8036, 8288, 8572, 8856, 9140, 9424, 9708, 9992, 10276, 10080, 10428, 10776, 11124, 11472, 11820, 12168, 12516, 11872, 12284, 12696, 13108, 13520, 13932, 14344, 14756, 13664, 14140, 14616, 15092, 15568, 16044, 16520, 16996}; */

// BLOCK_SIZE = 16
const int RESULT_MUL[16*16] = {19840,  19960,  20080,  20200,  20320,  20440,  20560,  20680,  20800,  20920,  21040,  21160,  21280,  21400,  21520,  21640,  50560,  50936,  51312,  51688,  52064,  52440,  52816,  53192,  53568,  53944,  54320,  54696,  55072,  55448,  55824,  56200,  81280,  81912,  82544,  83176,  83808,  84440,  85072,  85704,  86336,  86968,  87600,  88232,  88864,  89496,  90128,  90760, 112000, 112888, 113776, 114664, 115552, 116440, 117328, 118216, 119104, 119992, 120880, 121768, 122656, 123544, 124432, 125320, 142720, 143864, 145008, 146152, 147296, 148440, 149584, 150728, 151872, 153016, 154160, 155304, 156448, 157592, 158736, 159880, 173440, 174840, 176240, 177640, 179040, 180440, 181840, 183240, 184640, 186040, 187440, 188840, 190240, 191640, 193040, 194440, 204160, 205816, 207472, 209128, 210784, 212440, 214096, 215752, 217408, 219064, 220720, 222376, 224032, 225688, 227344, 229000, 234880, 236792, 238704, 240616, 242528, 244440, 246352, 248264, 250176, 252088, 254000, 255912, 257824, 259736, 261648, 263560, 265600, 267768, 269936, 272104, 274272, 276440, 278608, 280776, 282944, 285112, 287280, 289448, 291616, 293784, 295952, 298120, 296320, 298744, 301168, 303592, 306016, 308440, 310864, 313288, 315712, 318136, 320560, 322984, 325408, 327832, 330256, 332680, 327040, 329720, 332400, 335080, 337760, 340440, 343120, 345800, 348480, 351160, 353840, 356520, 359200, 361880, 364560, 367240, 357760, 360696, 363632, 366568, 369504, 372440, 375376, 378312, 381248, 384184, 387120, 390056, 392992, 395928, 398864, 401800,  388480, 391672, 394864, 398056, 401248, 404440, 407632, 410824, 414016, 417208, 420400, 423592, 426784, 429976, 433168, 436360, 419200, 422648, 426096, 429544, 432992, 436440, 439888, 443336, 446784, 450232, 453680, 457128, 460576, 464024, 467472, 470920, 449920, 453624, 457328, 461032, 464736, 468440, 472144, 475848, 479552, 483256, 486960, 490664, 494368, 498072, 501776, 505480, 480640, 484600, 488560, 492520, 496480, 500440, 504400, 508360, 512320, 516280, 520240, 524200, 528160, 532120, 536080, 540040};

// BLOCK_SIZE = 32
/* const int RESULT_MUL[32*32] = {333312,    333808,    334304,    334800,    335296,    335792,    336288,    336784,    337280,    337776,    338272,    338768,    339264,    339760,    340256,    340752,    341248,    341744,    342240,    342736,    343232,    343728,    344224,    344720,    345216,    345712,    346208,    346704,    347200,    347696,    348192,    348688,     841216,    842736,    844256,    845776,    847296,    848816,    850336,    851856,    853376,    854896,    856416,    857936,    859456,    860976,    862496,    864016,    865536,    867056,    868576,    870096,    871616,    873136,    874656,    876176,    877696,    879216,    880736,    882256,    883776,    885296,    886816,    888336,    1349120,   1351664,   1354208,   1356752,   1359296,   1361840,   1364384,   1366928,   1369472,   1372016,   1374560,   1377104,   1379648,   1382192,   1384736,   1387280,   1389824,   1392368,   1394912,   1397456,   1400000,   1402544,   1405088,   1407632,   1410176,   1412720,   1415264,   1417808,   1420352,   1422896,   1425440,   1427984,    1857024,   1860592,   1864160,   1867728,   1871296,   1874864,   1878432,   1882000,   1885568,   1889136,   1892704,   1896272,   1899840,   1903408,   1906976,   1910544,   1914112,   1917680,   1921248,   1924816,   1928384,   1931952,   1935520,   1939088,   1942656,   1946224,   1949792,   1953360,   1956928,   1960496,   1964064,   1967632,    2364928,   2369520,   2374112,   2378704,   2383296,   2387888,   2392480,   2397072,   2401664,   2406256,   2410848,   2415440,   2420032,   2424624,   2429216,   2433808,   2438400,   2442992,   2447584,   2452176,   2456768,   2461360,   2465952,   2470544,   2475136,   2479728,   2484320,   2488912,   2493504,   2498096,   2502688,   2507280,    2872832,   2878448,   2884064,   2889680,   2895296,   2900912,   2906528,   2912144,   2917760,   2923376,   2928992,   2934608,   2940224,   2945840,   2951456,   2957072,   2962688,   2968304,   2973920,   2979536,   2985152,   2990768,   2996384,   3002000,   3007616,   3013232,   3018848,   3024464,   3030080,   3035696,   3041312,    3046928,    3380736,   3387376,   3394016,   3400656,   3407296,   3413936,   3420576,   3427216,   3433856,   3440496,   3447136,   3453776,   3460416,   3467056,   3473696,   3480336,   3486976,   3493616,   3500256,   3506896,   3513536,   3520176,   3526816,   3533456,   3540096,   3546736,   3553376,   3560016,   3566656,   3573296,   3579936,   3586576,    3888640,   3896304,   3903968,   3911632,   3919296,   3926960,   3934624,   3942288,   3949952,   3957616,   3965280,   3972944,   3980608,   3988272,   3995936,   4003600,   4011264,   4018928,   4026592,   4034256,   4041920,   4049584,   4057248,   4064912,   4072576,   4080240,   4087904,   4095568,   4103232,   4110896,   4118560,   4126224,    4396544,   4405232,   4413920,   4422608,   4431296,   4439984,   4448672,   4457360,   4466048,   4474736,   4483424,   4492112,   4500800,   4509488,   4518176,   4526864,   4535552,   4544240,   4552928,   4561616,   4570304,   4578992,   4587680,   4596368,   4605056,   4613744,   4622432,   4631120,   4639808,   4648496,   4657184,   4665872,    4904448,   4914160,   4923872,   4933584,   4943296,   4953008,   4962720,   4972432,   4982144,   4991856,   5001568,   5011280,   5020992,   5030704,   5040416,   5050128,   5059840,   5069552,   5079264,   5088976,   5098688,   5108400,   5118112,   5127824,   5137536,   5147248,   5156960,   5166672,   5176384,   5186096,   5195808,   5205520,    5412352,   5423088,   5433824,   5444560,   5455296,   5466032,   5476768,   5487504,   5498240,   5508976,   5519712,   5530448,   5541184,   5551920,   5562656,   5573392,   5584128,   5594864,   5605600,   5616336,   5627072,   5637808,   5648544,   5659280,   5670016,   5680752,   5691488,   5702224,   5712960,   5723696,   5734432,   5745168,    5920256,   5932016,   5943776,   5955536,   5967296,   5979056,   5990816,   6002576,   6014336,   6026096,   6037856,   6049616,   6061376,   6073136,   6084896,   6096656,   6108416,   6120176,   6131936,   6143696,   6155456,   6167216,   6178976,   6190736,   6202496,   6214256,   6226016,   6237776,   6249536,   6261296,   6273056,   6284816,    6428160,   6440944,   6453728,   6466512,   6479296,   6492080,   6504864,   6517648,   6530432,   6543216,   6556000,   6568784,   6581568,   6594352,   6607136,   6619920,   6632704,   6645488,   6658272,   6671056,   6683840,   6696624,   6709408,   6722192,   6734976,   6747760,   6760544,   6773328,   6786112,   6798896,   6811680,   6824464,    6936064,   6949872,   6963680,   6977488,   6991296,   7005104,   7018912,   7032720,   7046528,   7060336,   7074144,   7087952,   7101760,   7115568,   7129376,   7143184,   7156992,   7170800,   7184608,   7198416,   7212224,   7226032,   7239840,   7253648,   7267456,   7281264,   7295072,   7308880,   7322688,   7336496,   7350304,   7364112,    7443968,   7458800,   7473632,   7488464,   7503296,   7518128,   7532960,   7547792,   7562624,   7577456,   7592288,   7607120,   7621952,   7636784,   7651616,   7666448,   7681280,   7696112,   7710944,   7725776,   7740608,   7755440,   7770272,   7785104,   7799936,   7814768,   7829600,   7844432,   7859264,   7874096,   7888928,   7903760,     7951872,   7967728,   7983584,   7999440,   8015296,   8031152,   8047008,   8062864,   8078720,   8094576,   8110432,   8126288,   8142144,   8158000,   8173856,   8189712,   8205568,   8221424,   8237280,   8253136,   8268992,   8284848,   8300704,   8316560,   8332416,   8348272,   8364128,   8379984,   8395840,   8411696,   8427552,   8443408,    8459776,   8476656,   8493536,   8510416,   8527296,   8544176,   8561056,   8577936,   8594816,   8611696,   8628576,   8645456,   8662336,   8679216,   8696096,   8712976,   8729856,   8746736,   8763616,   8780496,   8797376,   8814256,   8831136,   8848016,   8864896,   8881776,   8898656,   8915536,   8932416,   8949296,   8966176,   8983056,    8967680,   8985584,   9003488,   9021392,   9039296,   9057200,   9075104,   9093008,   9110912,   9128816,   9146720,   9164624,   9182528,   9200432,   9218336,   9236240,   9254144,   9272048,   9289952,   9307856,   9325760,   9343664,   9361568,   9379472,   9397376,   9415280,   9433184,   9451088,   9468992,   9486896,   9504800,   9522704,    9475584,   9494512,   9513440,   9532368,   9551296,   9570224,   9589152,   9608080,   9627008,   9645936,   9664864,   9683792,   9702720,   9721648,   9740576,   9759504,   9778432,   9797360,   9816288,   9835216,   9854144,   9873072,   9892000,   9910928,   9929856,   9948784,   9967712,   9986640,  10005568,  10024496,  10043424,  10062352,    9983488,  10003440,  10023392,  10043344,  10063296,  10083248,  10103200,  10123152,  10143104,  10163056,  10183008,  10202960,  10222912,  10242864,  10262816,  10282768,  10302720,  10322672,  10342624,  10362576,  10382528,  10402480,  10422432,  10442384,  10462336,  10482288,  10502240,  10522192,  10542144,  10562096,  10582048,   10602000,    10491392,  10512368,  10533344,  10554320,  10575296,  10596272,  10617248,  10638224,  10659200,  10680176,  10701152,  10722128,  10743104,  10764080,  10785056,  10806032,  10827008,  10847984,  10868960,  10889936,  10910912,  10931888,  10952864,  10973840,  10994816,  11015792,  11036768,  11057744,  11078720,  11099696,  11120672,  11141648,   10999296,  11021296,  11043296,  11065296,  11087296,  11109296,  11131296,  11153296,  11175296,  11197296,  11219296,  11241296,  11263296,  11285296,  11307296,  11329296,  11351296,  11373296,  11395296,  11417296,  11439296,  11461296,  11483296,  11505296,  11527296,  11549296,  11571296,  11593296,  11615296,  11637296,  11659296,  11681296,   11507200,  11530224,  11553248,  11576272,  11599296,  11622320,  11645344,  11668368,  11691392,  11714416,  11737440,  11760464,  11783488,  11806512,  11829536,  11852560,  11875584,  11898608,  11921632,  11944656,  11967680,  11990704,  12013728,  12036752,  12059776,  12082800,  12105824,  12128848,  12151872,  12174896,  12197920,  12220944,   12015104,  12039152,  12063200,  12087248,  12111296,  12135344,  12159392,  12183440,  12207488,  12231536,  12255584,  12279632,  12303680,  12327728,  12351776,  12375824,  12399872,  12423920,  12447968,  12472016,  12496064,  12520112,  12544160,  12568208,  12592256,  12616304,  12640352,  12664400,  12688448,  12712496,  12736544,  12760592,   12523008,  12548080,  12573152,  12598224,  12623296,  12648368,  12673440,  12698512,  12723584,  12748656,  12773728,  12798800,  12823872,  12848944,  12874016,  12899088,  12924160,  12949232,  12974304,  12999376,  13024448,  13049520,  13074592,  13099664,  13124736,  13149808,  13174880,  13199952,  13225024,  13250096,  13275168,  13300240,   13030912,  13057008,  13083104,  13109200,  13135296,  13161392,  13187488,  13213584,  13239680,  13265776,  13291872,  13317968,  13344064,  13370160,  13396256,  13422352,  13448448,  13474544,  13500640,  13526736,  13552832,  13578928,  13605024,  13631120,  13657216,  13683312,  13709408,  13735504,  13761600,  13787696,  13813792,  13839888,   13538816,  13565936,  13593056,  13620176,  13647296,  13674416,  13701536,  13728656,  13755776,  13782896,  13810016,  13837136,  13864256,  13891376,  13918496,  13945616,  13972736,  13999856,  14026976,  14054096,  14081216,  14108336,  14135456,  14162576,  14189696,  14216816,  14243936,  14271056,  14298176,  14325296,  14352416,  14379536,   14046720,  14074864,  14103008,  14131152,  14159296,  14187440,  14215584,  14243728,  14271872,  14300016,  14328160,  14356304,  14384448,  14412592,  14440736,  14468880,  14497024,  14525168,  14553312,  14581456,  14609600,  14637744,  14665888,  14694032,  14722176,  14750320,  14778464,  14806608,  14834752,  14862896,  14891040,  14919184,   14554624,  14583792,  14612960,  14642128,  14671296,  14700464,  14729632,  14758800,  14787968,  14817136,  14846304,  14875472,  14904640,  14933808,  14962976,  14992144,  15021312,  15050480,  15079648,  15108816,  15137984,  15167152,  15196320,  15225488,  15254656,  15283824,  15312992,  15342160,  15371328,  15400496,  15429664,  15458832,   15062528,  15092720,  15122912,  15153104,  15183296,  15213488,  15243680,  15273872,  15304064,  15334256,  15364448,  15394640,  15424832,  15455024,  15485216,  15515408,  15545600,  15575792,  15605984,  15636176,  15666368,  15696560,  15726752,  15756944,  15787136,  15817328,  15847520,  15877712,  15907904,  15938096,  15968288,  15998480,   15570432,  15601648,  15632864,  15664080,  15695296,  15726512,  15757728,  15788944,  15820160,  15851376,  15882592,  15913808,  15945024,  15976240,  16007456,  16038672,  16069888,  16101104,  16132320,  16163536,  16194752,  16225968,  16257184,  16288400,  16319616,  16350832,  16382048,  16413264,  16444480,  16475696,  16506912,  16538128,   16078336,  16110576,  16142816,  16175056,  16207296,  16239536,  16271776,  16304016,  16336256,  16368496,  16400736,  16432976,  16465216,  16497456,  16529696,  16561936,  16594176,   16626416,  16658656,  16690896,  16723136,  16755376,  16787616,  16819856,  16852096,  16884336,  16916576,  16948816,  16981056,  17013296,  17045536,  17077776}; */
